package com.example.building_material_mannager.controller;

import com.example.building_material_mannager.entity.Montype;
import com.example.building_material_mannager.service.MontypeService;
import org.springframework.stereotype.Controller;

import javax.annotation.Resource;
import java.util.List;

@Controller
class MontypeController {
    @Resource
    MontypeService montypeService;

    public void showMontype(Montype montype){
        List<Montype> montypes=montypeService.showMontype(montype);

    }
    //增加
    public void addMontype(Montype montype){

        boolean re = montypeService.addMontype(montype);
        System.out.println(re);
    }
    //刪除
    public void delMontype(Integer mid){

        boolean re = montypeService.delMontype(mid);
        System.out.println(re);
    }
    //更新
    public void upMontype(Montype montype){

        boolean re = montypeService.upMontype(montype);
        System.out.println(re);
    }
}
